#include <iostream>
#include <cstdio>
#include <cassert>
typedef long double db;

#include "./utils/rnd.cpp"

const int width  = 400; // 桌子宽度
const int height = 200; // 桌子高度
const int plateCnt = 10; // 盘子数量
const db rLowerBound = 30.00L; // 盘子半径下界
const db rUpperBound = 50.00L; // 盘子半径上界
const db execTimeLmt = 5.00L; // 执行时间限制

signed main(int argc, char* argv[]) {
    assert(argc == 2);
    FILE* dataFile = fopen(argv[1], "w");
    fprintf(stderr, "--- Data Generation Start ---\n");
    fprintf(stderr, "Width: %d\nHeight: %d\n", width, height);
    fprintf(dataFile, "W%Lf H%Lf\n", width * 1.0L, height * 1.0L);
    fprintf(stderr, "Number of plates: %d\n", plateCnt);
    for (int idx = 1; idx <= plateCnt; ++idx) {
        const db r = rnd(rLowerBound, rUpperBound);
        fprintf(stderr, "#%02d: r=%6.2Lf\n", idx, r);
        fprintf(dataFile, "r%Lf\n", r);
    }
    fprintf(stderr, "Exec time limit: %2.2Lf\n", execTimeLmt);
    fprintf(dataFile, "T%Lf\n", execTimeLmt);
    fprintf(stderr, "--- Data Generation Done  ---\n");
    return 0;
}
